package com.example.orderservice_1;

import com.example.orderservice_1.domain.Settlement;
import com.example.orderservice_1.service.SettlementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/settlements")
public class SettlementController {

    @Autowired
    private SettlementService settlementService;

    // 创建结算
    @PostMapping
    public Settlement createSettlement(@RequestBody Settlement settlement) {
        return settlementService.createSettlement(settlement);
    }
}
